#ifndef __KDUMP_H__
# define __KDUMP_H__

#define DEFAULT_FILENAME "ktrace.out"
#define OPT_STRING "dEfHlmnpRrsTt"
#define BUFF_SIZE 512


typedef struct	s_args
{
  char		*file;
  int		d;
  int		h;
  int		pid;
  int		E;
  int		s;
  int		l;
  int		T;
  int		R;
  int		n;
  int		m;
  int		r;
}		t_args; 

typedef struct s_pt
{
  int a;
  void (*func)(struct ktr_header kd, int fd, t_args*);
} t_pt;


void init(t_args*);
t_args* init_args(int ac, char **av);
void kd_sysret(struct ktr_header, int, t_args*);
void kd_syscall(struct ktr_header kd, int fd, t_args*);
void kd_namei(struct ktr_header kd, int fd, t_args*);
void kd_genio(struct ktr_header kd, int fd, t_args*);
void kd_psig(struct ktr_header kd, int fd, t_args*);
void kd_csw(struct ktr_header kd, int fd, t_args*);
void kd_user(struct ktr_header kd, int fd, t_args*);
void kd_sysctl(struct ktr_header kd, int fd, t_args*);
void kd_struct(struct ktr_header kd, int fd, t_args*);
void print_stat(struct stat, t_args*);
void aff_droit(int);
void aff_time(time_t time, char *name);
void aff_r(struct stat s);
void my_hexdump(char *p, int size);

#endif /*__KDUMP_H__*/
